package com.bookcloud.java21.chapter6.接口的扩展68;

public class Labrador implements Dog {
  private String name;

  public Labrador(String name) {
    this.name = name;
  }

  @Override
  public String getName() {
    return name;
  }

  // Animal接口方法
  @Override
  public void eat() {
    System.out.println(name + " 正在吃东西");
  }

  @Override
  public void sleep() {
    System.out.println(name + " 正在睡觉");
  }

  // Mammal接口方法
  @Override
  public void giveBirth() {
    System.out.println(name + " 是胎生动物");
  }

  // Pet接口方法
  @Override
  public void play() {
    System.out.println(name + " 正在玩耍");
  }

  // Dog接口方法
  @Override
  public void bark() {
    System.out.println(name + " 汪汪叫");
  }

  @Override
  public void move() {
    System.out.println(name + " 正在移动");
  }
}
